package com.jeesite.modules.stock.service;

import com.jeesite.modules.stock.dto.vo.SectorRecord;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.jeesite.modules.stock.dao.SectorsDao;
import com.jeesite.modules.stock.entity.SectorsEntity;

@Service
public class SectorsService {

    @Autowired
    private SectorsDao sectorsDao;

    public SectorRecord findDataBySectorName(String sectorName) {
        sectorName = sectorName.replace("!", "/");
        SectorsEntity entity = sectorsDao.findDataBySectorName(sectorName);
        SectorRecord vo = null;
        if (entity != null) {
            return new SectorRecord(Integer.parseInt(entity.getId()), entity.getSectorName());
        }

        return null;
    }

}
